﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SoTheoDoiDeTai.ascx.cs" Inherits="QuanLyDeTaiKHCN.UserControls.Others.SoTheoDoiDeTai" %>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="ud" runat="server">
    <ContentTemplate>
<div id="PrintContent">
    <table class="tableformat">
        <asp:Label ID="lblcontent" runat="server"></asp:Label>
    </table>
</div>
<asp:LinkButton ID="btn_indanhsachdoanvien" Visible="true" runat="server" class="btn btn-warning" OnClientClick="javascript:printDiv('PrintContent');" ToolTip="Nhấp để in danh sách đoàn viên"><i class="icon-print"></i> In danh sách</asp:LinkButton>
        <asp:LinkButton ID="LinkExport" Visible="true" runat="server" class="btn btn-warning" OnClick="LinkExport_Click" ToolTip="Nhấp để xuất bảng theo dõi"><i class="icon-signout"></i> Xuất excel</asp:LinkButton>
    </ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
    function printDiv(divID) {
        //Get the HTML of div
        var divElements = document.getElementById(divID).innerHTML;
        //Get the HTML of whole page
        var oldPage = document.body.innerHTML;

        //Reset the page's HTML with div's HTML only
        document.body.innerHTML =
          "<html><head><title></title></head><body>" +
          divElements + "</body>";

        //Print Page
        window.print();

        //Restore orignal HTML
        document.body.innerHTML = oldPage;
    }
    </script>

